//
// Created by moonlight on 25-7-20.
//
#include <iostream>
#include <stack>
using namespace std;

void test01(){
    stack<int> s;
    s.push(10);
    s.push(20);
    s.push(30);
    s.push(40);
    while(!s.empty()) {
        cout <<"栈顶元素: "<< s.top() <<" size:"<<s.size()<< endl;
        s.pop();
    }
}
int main() {
    test01();
    return 0;
}